import Vue from 'vue'
import Router from 'vue-router'
import CommonPage from '../components/common/commonPage.vue'
import index from '../views/index.vue'
import jobInfo from '../views/jobInfo.vue'
import resumeCol from '../views/resumeCol.vue'
import violationHint from '../views/violationHint.vue'
import companyinfo from '../views/hrViews/companyinfo.vue'
import hrchangepw from '../views/hrchangepw.vue'
import enterpriseInfo from '../views/enterpriseInfo.vue'

import jobseekerInfo from '../views/jobseekerViews/jobseekerInfo.vue'
import onlineCV from '../views/onlineCV.vue'
import editonlineCV from '../views/editonlineCV.vue'
import localCV from '../views/localCV.vue'
import companyCol from '../views/companyCol.vue'
import jobCol from '../views/jobCol.vue'
import CVProgress from '../views/CVProgress.vue'
import studChangepw from '../views/studChangepw'
import studChangemail from '../views/studChangemail.vue'
import studChangetel from '../views/studChangetel.vue'
import logOut from '../views/logOut.vue'
import jobseekerinfor from '../views/jobseekerinfor.vue'


// import notice from "../views/notice";
import jobDescription from "../views/jobDescription";
import companyProfile from "../views/companyProfile";
import jobInfoHome from '../views/jobInfoHome.vue'
import jobPublish from '../views/jobPublish.vue'
import jobModify from '../views/jobModify.vue'
import statusing from '../views/statusing.vue'
import statusover from '../views/statusover.vue'
import checkresume from '../views/checkresume.vue'
import sendinterview from '../views/sendinterview.vue'
import refuse from '../views/refuse.vue'
import sendoffer from '../views/sendoffer.vue'
import sendjob from '../views/sendjob.vue'






Vue.use(Router)
const infoCenter = resolve => require(['../views/infoCenter.vue'], resolve)
const login = resolve => require(['../views/login.vue'], resolve)
const register = resolve => require(['../views/register.vue'], resolve)
const findpass = resolve => require(['../views/findpass.vue'], resolve)
const notice = resolve => require(['../views/notice.vue'], resolve)
const shixipartition = resolve => require(['../views/shixipartition.vue'], resolve)
const xiaozhaopartition = resolve => require(['../views/xiaozhaopartition.vue'], resolve)
const remenpartition = resolve => require(['../views/remenpartition.vue'], resolve)
const userInfo = resolve => require(['../views/userInfo.vue'], resolve)
const companyDetail = resolve => require(['../views/companyDetail.vue'], resolve)
const search = resolve => require(['../views/searchRes.vue'], resolve)
//const searchCV = resolve => require(['../views/searchCV.vue'], resolve)
const hrUserInfo = resolve => require(['../views/hrViews/userInfo.vue'], resolve)

//const jobseekerInfo = resolve => require(['../views/jobseekerViews/jobseekerInfo.vue'], resolve)
//const companyinfo = resolve => require(['../views/hrViews/companyinfo.vue'], resolve)



export default new Router({
  routes: [
    {
      path: '/',
      component: CommonPage,
      children: [
        {
          path: '/',
          name: 'index',
          component: index
        }
      ]
    },
    {
      path: '/jobInfo',
      component: CommonPage,
      children: [
        {
          path: 'search/jobInfo',
          name: 'jobInfo',
          component: jobInfo
        }
      ]
    },
    {
      path: '/infoCenter',
      component: CommonPage,
      children: [
        {
          path: '/',
          name: 'infoCenter',
          component: infoCenter
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/findpass',
      name: 'findpass',
      component: findpass
    },
    {
      path: '/notice',
      component: CommonPage,
      children: [
        {
          path: '',
          name: 'notice',
          component: notice
        }
      ]
    },
    {
      path: '/shixipartition',
      component: CommonPage,
      children: [
        {
          path: '',
          name: 'shixipartition',
          component: shixipartition
        }
      ]
    },
    {
      path: '/xiaozhaopartition',
      component: CommonPage,
      children: [
        {
          path: '',
          name: 'xiaozhaopartition',
          component: xiaozhaopartition
        }
      ]
    },
    {
      path: '/remenpartition',
      component: CommonPage,
      children: [
        {
          path: '',
          name: 'remenpartition',
          component: remenpartition
        }
      ]
    },
    {
      path: '/companyProfile',
      name: 'companyProfile',
      component: companyProfile
    },
    {
      path: '/jobDescription',
      name: 'jobDescription',
      component: jobDescription
    },
    {
      path: '/userInfo',
      component: CommonPage,
      children: [
        {
          path: '/',
          name: 'userInfo',
          component: userInfo
        }
      ]
    },
    {
      path: '/companyDetail',
      component: CommonPage,
      children: [
        {
          path: '/',
          name: 'companyDetail',
          component: companyDetail
        }
      ]
    },
    {
      path: '/search',
      component: CommonPage,
      children: [
        {
          path: '',
          name: 'search',
          component: search
        }
      ]
    },
/*     {
     path: '/searchCV',
      component: CommonPage,
      children: [
        {
          path: '',
          name: 'searchCV',
          component: searchCV
        }
      ]
    },*/

    {
      path: '/hrView',
      component: CommonPage,
      children: [
        {
          path: '/',
          name: 'hrView',
          component: hrUserInfo
        }
      ]
    },
    {
      path: '/companyinfo',
      component: CommonPage,
      children: [
        {
          path: '/',
          component: companyinfo,
          children: [
            {
              path: '/enterpriseInfo',
              name: 'enterpriseInfo',
              component: enterpriseInfo
            },
            {
              path: '/resumeCol',
              component: resumeCol
            },
            {
              path: '/violationHint',
              component: violationHint
            },
            {
              path: '/hrchangepw',
              component: hrchangepw
            },
            {
              path: '/jobInfoHome',
              component: jobInfoHome
            },
            {
              path: '/jobPublish',
              component: jobPublish
            },
            {
              path: '/jobModify',
              component: jobModify
            },
            {
              path: '/statusing',
              component: statusing
            },
            {
              path: '/statusover',
              component: statusover
            },
            {
              path: '/refuse',
              component: refuse
            },
            {
              path: '/sendinterview',
              component: sendinterview
            },
            {
              path: '/sendoffer',
              component: sendoffer
            },

            {
              path: '/checkresume',
              component: checkresume

            },
            {
              path: '/sendjob',
              component: sendjob
            }


          ]
        }
      ]
    },

    {
      path: '/jobseekerInfo',
      component: CommonPage,
      children: [
        {
          path: '/',
          component: jobseekerInfo,
          children: [
            {
              path: '/jobseekerinfor',
              name: 'jobseekerInfo',
              component: jobseekerinfor
            },
            {
              path: '/onlineCV',
              component: onlineCV
            },
            {
              path: '/editonlineCV',
              component: editonlineCV
            },
            {
              path: '/localCV',
              component: localCV
            },
            {
              path: '/companyCol',
              component: companyCol
            },
            {
              path: '/jobCol',
              component: jobCol
            },
            {
              path: '/CVProgress',
              component: CVProgress
            },
            {
              path: '/studChangepw',
              component: studChangepw
            },
            {
              path: '/studChangemail',
              component: studChangemail
            },
            {
              path: '/studChangetel',
              component: studChangetel
            },
            {
              path: '/logOut',
              component:logOut
            }
          ]
        }
      ]
    }
  ]
})
